//
//  CommentManager.m
//  iModern
//
//  Created by Ralf on 15/5/14.
//  Copyright (c) 2015年 com.starlooking. All rights reserved.
//

#import "CommentManager.h"

@implementation CommentManager

- (ResultSet *)queryByArticleID:(NSString *)articleID offset:(NSInteger)offset max:(NSInteger)max
{
    NSDictionary *params = [NSMutableDictionary new];
    [params setValue:articleID forKey:@"articleID"];
    return [self request:@"comment/queryComment" params:params];
}

- (ResultSet *)addComment:(NSString *)articleID comment:(NSString *)comment
{
    NSDictionary *params = [NSMutableDictionary new];
    [params setValue:comment forKey:@"message"];
    [params setValue:articleID forKey:@"articleID"];
    [params setValue:[self getSessionID] forKey:@"sessionID"];
    return [self request:@"comment/addComment" params:params];
}

@end
